<!DOCTYPE html>
<html>
<head>
    <title>FinData</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            background-color: #0a0a0a;
            color: #e0e0e0;
        }
        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 30px;
            background-color: #121212;
            border-bottom: 1px solid #333;
        }
        .logo {
            width: 40px;
            height: 40px;
            margin-right: 15px;
        }
        .logo-text {
            font-size: 24px;
            font-weight: bold;
            background: linear-gradient(90deg, #8a2be2, #00bfff);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-right: auto; /* 添加这个让导航靠右 */
            padding-left: 15px;
        }
        .nav-container {
            display: flex;
            gap: 20px;
        }
        .nav-item {
            padding: 10px 20px;
            background-color: #1e1e1e;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
            color: #e0e0e0;
        }
        .nav-item:hover {
            background-color: #8a2be2;
            transform: translateY(-2px);
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="logo-container">
            <svg class="logo" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
                <path d="M20 0 L40 20 L20 40 L0 20 Z" fill="#8a2be2"/>
                <path d="M10 10 L30 10 L30 30 L10 30 Z" fill="#00bfff"/>
                <path d="M15 15 L25 15 L25 25 L15 25 Z" fill="#4CAF50"/>
            </svg>
            <div class="logo-text">FinData</div>
        </div>
        
        <div class="nav-container">
            <div class="nav-item" onclick="window.location.href='/login'">登录</div>
            <div class="nav-item" onclick="window.location.href='/favorites'">自选</div>
            <div class="nav-item" onclick="window.location.href='/data'">数据</div>
            <div class="nav-item" onclick="checkLoginForBacktest()">回测</div>
            <a class="nav-item" href="/forum" style="text-decoration: none;">论坛</a>
            <!-- 移除了"想和我们聊聊"按钮 -->
        </div>
    </div>

    <!-- 添加登录提示模态框 -->
    <div id="loginModal" class="modal">
        <div class="modal-content">
            <span class="close-btn">&times;</span>
            <div class="modal-icon">
                <svg viewBox="0 0 24 24" width="48" height="48" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="#8a2be2" stroke-width="2"/>
                    <path d="M12 16V12M12 8H12.01" stroke="#8a2be2" stroke-width="2" stroke-linecap="round"/>
                </svg>
            </div>
            <h3 class="modal-title">需要登录</h3>
            <p class="modal-message">请先登录以使用回测功能</p>
            <div class="modal-buttons">
                <button class="modal-btn cancel-btn" onclick="closeModal()">取消</button>
                <button class="modal-btn login-btn" onclick="window.location.href='/login'">立即登录</button>
            </div>
        </div>
    </div>

    <!-- 删除以下灰色大框部分 -->
    <!-- 
    <div class="content-area">
        <-- 内容区域 -->
    </div>
</body>

<style>
    /* 恢复content-area样式 */
    /* 删除以下.content-area相关样式 */
    /*
    .content-area {
        margin: 30px;
        height: 500px;
        background-color: #121212;
        border-radius: 5px;
    }
    */
    /* 更新对齐样式 */
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 30px;
        background-color: #121212;
        border-bottom: 1px solid #333;
    }

    .logo-container {
        display: flex;
        align-items: center;
    }

    .logo {
        width: 40px;
        height: 40px;
        margin-right: 10px;
        filter: drop-shadow(0 0 5px rgba(138, 43, 226, 0.7));
        animation: pulse 2s infinite alternate;
    }
    
    .logo-text {
        font-size: 24px;
        font-weight: bold;
        background: linear-gradient(90deg, #8a2be2, #a855f7, #c084fc);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
        animation: shine 3s linear infinite;
        margin-right: auto;
        padding-left: 15px;
    }

    /* 添加新的动画效果 */
    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 0.8;
        }
        100% {
            transform: scale(1.1);
            opacity: 1;
            filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.9));
        }
    }

    @keyframes shine {
        to {
            background-position: 200% center;
        }
    }
</style>

<!-- 更新SVG图标 -->
<!-- 完全删除以下重复的SVG定义 -->
<!-- 
<svg class="logo" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
    <path d="M20 0 L30 20 L20 40 L10 20 Z" fill="url(#grad1)" />
    <path d="M10 10 L30 10 L20 30 L10 30 Z" fill="url(#grad2)" />
    <defs>
        <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
            <stop offset="0%" stop-color="#8a2be2" />
            <stop offset="100%" stop-color="#4b0082" />
        </linearGradient>
        <linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
            <stop offset="0%" stop-color="#a855f7" />
            <stop offset="100%" stop-color="#7e22ce" />
        </linearGradient>
    </defs>
</svg> 
-->

<script>
    // 显示登录提示
    function checkLoginForBacktest() {
        // 显示登录提示模态框
        document.getElementById('loginModal').style.display = 'flex';
    }
    
    // 关闭模态框
    function closeModal() {
        document.getElementById('loginModal').style.display = 'none';
    }

    // 点击模态框外部关闭
    window.onclick = function(event) {
        const modal = document.getElementById('loginModal');
        if (event.target == modal) {
            modal.style.display = 'none';
        }
    }

    // 点击关闭按钮关闭模态框
    document.addEventListener('DOMContentLoaded', function() {
        const closeBtn = document.querySelector('.close-btn');
        if(closeBtn) {
            closeBtn.addEventListener('click', closeModal);
        }
    });
</script>

<style>
    /* 更新导航栏样式 */
    .nav-container {
        display: flex;
        gap: 15px;
        padding-right: 30px;
    }
    
    .nav-item {
        position: relative;
        padding: 12px 24px;
        background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
        border-radius: 8px;
        color: #e0e0e0;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
        z-index: 1;
    }
    
    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, #8a2be2, #00bfff);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(138, 43, 226, 0.3);
        color: white;
    }
    
    .nav-item:hover::before {
        opacity: 1;
    }
    
    .nav-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: #4CAF50;
        transition: all 0.3s ease;
    }
    
    .nav-item:hover::after {
        width: 70%;
        left: 15%;
    }
    .nav-item.login {
        background: linear-gradient(145deg, #8a2be2, #4b0082);
        color: white;
        font-weight: bold;
    }
    
    .nav-item.login:hover {
        background: linear-gradient(145deg, #9b3cf5, #5c11a3);
    }
</style>

<!-- 在body结束前添加版权声明 -->
<footer style="
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: rgba(18, 18, 18, 0.8);
    font-size: 12px;
    color: #888;
">
    © 2023-2024 FinData. All Rights Reserved. 保留所有权利。
</footer>

<style>
    /* 更新展示栏样式 */
    .showcase {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 2.5rem;
        font-weight: bold;
        text-align: center;
        background: linear-gradient(90deg, #8a2be2, #00bfff, #ff1493);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
        animation: shine 5s linear infinite;
        white-space: nowrap;
        z-index: 10;
    }

    /* 新增文字粒子效果 */
    .text-particles {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%; /* 限制宽度 */
        height: 100px;
        pointer-events: none;
        z-index: 5;
    }
    
    /* 更新粒子动画 */
    @keyframes textFloat {
        0%, 100% {
            transform: translate(calc(var(--x) * 0.5), calc(var(--y) * 0.5));
            opacity: 0;
        }
        50% {
            opacity: 0.8;
            transform: translate(calc(var(--x) * 0.8), calc(var(--y) * 0.8));
        }
    }
</style>

<!-- 在body中添加粒子效果 -->
<body>
    <!-- ... 导航栏保持不变 ... -->
    
    <div class="showcase">专注使用Python进行各类市场的量化策略研究与实践</div>
    <div class="text-particles" id="textParticles"></div>
    
    <!-- ... 版权声明保持不变 ... -->
    
    <script>
        // 为文字添加粒子效果
        const text = "专注使用Python进行各类市场的量化策略研究与实践";
        const textParticles = document.getElementById('textParticles');
        
        // 为每个字符创建粒子
        text.split('').forEach((char, index) => {
            for (let i = 0; i < 3; i++) { // 减少粒子数量
                const particle = document.createElement('div');
                particle.className = 'text-particle';
                
                // 限制粒子位置在文字周围
                const left = 50 + (index - text.length/2) * 15;
                particle.style.left = `${left + Math.random() * 10 - 5}%`;
                particle.style.top = `50%`;
                
                // 减小粒子运动范围
                const angle = Math.random() * Math.PI * 2;
                const distance = 5 + Math.random() * 15; // 减小运动距离
                particle.style.setProperty('--x', `${Math.cos(angle) * distance}px`);
                particle.style.setProperty('--y', `${Math.sin(angle) * distance}px`);
                
                textParticles.appendChild(particle);
            }
        });
    </script>
</body>

<style>
    /* 更新向下箭头容器样式 */
    .scroll-indicator {
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        z-index: 100;
        cursor: pointer;
    }
    
    /* 确保文字样式 */
    .scroll-text {
        color: #a855f7;
        font-size: 1rem;
        margin-bottom: 10px;
        text-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
        opacity: 0.8;
        transition: all 0.3s ease;
    }
    
    /* 确保箭头样式 */
    .scroll-arrow {
        width: 0;
        height: 0;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 20px solid #8a2be2;
        animation: pulseArrow 2s infinite ease-in-out;
        filter: drop-shadow(0 0 5px rgba(138, 43, 226, 0.7));
        transition: all 0.3s ease;
    }
    
    /* 添加悬停效果 */
    .scroll-indicator:hover .scroll-text {
        color: #00bfff;
        text-shadow: 0 0 15px rgba(0, 191, 255, 0.8);
    }
    
    .scroll-indicator:hover .scroll-arrow {
        border-top-color: #00bfff;
        transform: translateY(5px) scale(1.1);
    }
    
    @keyframes pulseArrow {
        0%, 100% {
            transform: translateY(0);
            opacity: 0.3;
            filter: blur(2px) drop-shadow(0 0 5px rgba(138, 43, 226, 0.7));
        }
        50% {
            transform: translateY(10px);
            opacity: 1;
            filter: blur(0) drop-shadow(0 0 10px rgba(138, 43, 226, 0.9));
        }
    }
</style>

<!-- 移除了向下箭头和滚动函数 -->

<!-- ... 版权声明保持不变 ... -->

<style>
    /* 模态框样式 */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 1000;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(5px);
    }
    
    .modal-content {
        background-color: #1e1e1e;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(138, 43, 226, 0.4);
        padding: 30px;
        width: 400px;
        max-width: 90%;
        text-align: center;
        position: relative;
        animation: modalAppear 0.3s ease-out;
    }
    
    @keyframes modalAppear {
        from {
            opacity: 0;
            transform: translateY(-50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        cursor: pointer;
        color: #888;
        transition: color 0.3s;
    }
    
    .close-btn:hover {
        color: #8a2be2;
    }
    
    .modal-icon {
        margin-bottom: 20px;
    }
    
    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
        background: linear-gradient(90deg, #8a2be2, #00bfff);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    
    .modal-message {
        color: #e0e0e0;
        margin-bottom: 25px;
        font-size: 1.1rem;
    }
    
    .modal-buttons {
        display: flex;
        justify-content: center;
        gap: 15px;
    }
    
    .modal-btn {
        padding: 10px 20px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.3s;
    }
    
    .cancel-btn {
        background-color: #333;
        color: #e0e0e0;
    }
    
    .cancel-btn:hover {
        background-color: #444;
    }
    
    .login-btn {
        background: linear-gradient(90deg, #8a2be2, #00bfff);
        color: white;
    }
    
    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
    }

    /* 更新导航栏样式 */
    .nav-container {
        display: flex;
        gap: 15px;
        padding-right: 30px;
    }
    
    .nav-item {
        position: relative;
        padding: 12px 24px;
        background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
        border-radius: 8px;
        color: #e0e0e0;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
        z-index: 1;
    }
    
    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, #8a2be2, #00bfff);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(138, 43, 226, 0.3);
        color: white;
    }
    
    .nav-item:hover::before {
        opacity: 1;
    }
    
    .nav-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: #4CAF50;
        transition: all 0.3s ease;
    }
    
    .nav-item:hover::after {
        width: 70%;
        left: 15%;
    }
    .nav-item.login {
        background: linear-gradient(145deg, #8a2be2, #4b0082);
        color: white;
        font-weight: bold;
    }
    
    .nav-item.login:hover {
        background: linear-gradient(145deg, #9b3cf5, #5c11a3);
    }
</style>
